﻿<UserControl x:Class="Deployment.Data.UI.Controls.Task.TaskEditorControl"
             xmlns:myUI="clr-namespace:Deployment.Data.UI.Controls.Task"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
             mc:Ignorable="d" 
             x:Name="Control"
             DataContextChanged="UserControl_DataContextChanged"
             d:DesignHeight="300" d:DesignWidth="300">
    
    <DockPanel LastChildFill="True">
        <Grid DockPanel.Dock="Top">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
          
            <Label Grid.Column="0" Grid.Row="0"
                   VerticalAlignment="Center"
                   Margin="2"
                   Padding="2"
                   Content="Task Id:"/>
            <xctk:IntegerUpDown Grid.Column="1" Grid.Row="0"
                                Margin="2"
                                Padding="2"
                                VerticalAlignment="Center"
                                Value="{Binding Id}"/>

            <Label Grid.Column="0" Grid.Row="1"
                   Margin="2"
                   Padding="2"
                   VerticalAlignment="Center"
                   Content="Task descrition:"/>
            <TextBox Grid.Column="1" Grid.Row="1"
                     Margin="2"
                     Padding="2"
                     VerticalAlignment="Center"
                     Text="{Binding Description}"/>
            
        </Grid>
        <CheckBox IsChecked="{Binding Path=isContentOk, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" 
                  x:Name="placeholderCheckbox" Visibility="Collapsed"
                  Checked="placeholderCheckbox_Checked"/>
            
       
        
        <ScrollViewer DockPanel.Dock="Bottom" Content="{Binding TaskControl}"
                      x:Name="ContentControl"/>
        
    </DockPanel>
</UserControl>
